The invention relates to the art of data acquisition devices, and more particularly, to autoranging techniques for automatically selecting a measurement range of a signal.
Scientists and engineers often use test and measurement and data acquisition systems to perform a variety of functions, including laboratory research, process monitoring and control, data logging, analytical chemistry, test and analysis of physical phenomena and control of mechanical or electrical machinery, to name a few examples. One example of hardware to implement such measuring systems is a computer-based measurement system or data acquisition (DAQ) system. A computer-based measurement or DAQ system typically includes transducers for measuring and providing electrical signals, signal conditioning hardware which may perform amplification, isolation and/or filtering, and measurement or DAQ hardware for receiving digital and analog signals and providing them to a processing system, such as a personal computer. The computer may further include analysis hardware and software for analyzing and appropriately displaying the measured data.
As mentioned above, a measurement system may include one or more of a measurement or DAQ device comprised in or connected to a computer system. The device may be an I/O board plugged into one of the I/O slots of the processing or computer system. The measurement or DAQ device may also comprise an external device connected to a computer system. Exemplary hardware I/O (input/output) interface options include the GPIB (general purpose interface bus), the VXI bus, the PXI bus, or a serial bus such as the RS-232 protocol, IEEE 1394, or USB.
When a signal is desired to be measured, a measurement range is typically first selected before measuring the signal. The measurement range allows the measuring device to more accurately measure the signal. A measuring device typically implements multiple measurement ranges. For example, a measuring device may possess measurement ranges of 200 volts, 20 volts, 2 volts, 200 millivolts and 20 millivolts. When a 1.5 volt signal is being measured, the measuring device should use the 2 volt measurement range because the measuring device will more accurately be able to measure the 1.5 volt signal using the 2 volt measurement range than using other measurement ranges. For example, if the measuring device was set at the 20 volt measurement range, the measurement device would not be able to measure the 1.5 volt signal as accurately because 1.5 volts is very small in comparison to 20 volts. Furthermore, if the measuring device was set at the 200 millivolt measurement range, the measurement device would register an error because the 1.5 volt signal is outside of the 200 millivolt range.
When measuring a signal, measurement systems may implement an autoranging technique for automatically selecting a measurement range without user input. Thus, autoranging allows the system to automatically select the measurement range without requiring the user to manually select the measurement range. In one autoranging technique, the measurement system obtains a measurement at a default measurement range, such as the largest range. If the default measurement range is not the correct range with which to measure the signal, then the next measurement range will be tested with a new measurement to see if it is the correct range. If that range is not the correct range, then the next measurement range will be tested with a new measurement and so forth until the correct range is found. A disadvantage of this technique is the inefficiency of taking a new measurement in each tested measurement range before a correct measurement range is found.
It would therefore be desirable to develop a system and method that allows a measurement system to more quickly find a correct measurement range in measuring a signal.
The problems outlined above are in large part solved by a system and method that allows a measurement system to implement an autoranging technique, preferably in software, for automatically selecting a measurement range of a signal without requiring a new measurement in each tested measurement range.
A measurement device may be configured to a correct measurement range faster by implementing an autoranging system and method in software. Once an initial measurement or reading is received, the initial measurement is compared with a current measurement range. The method then determines if the initial measurement or reading is greater than the upper voltage of the current measurement range. If the initial measurement or reading is greater than the upper voltage of the current measurement range, then the reading is presumed inaccurate, since the current range may not have been sufficiently large to properly read the measurement. The method then sets the current range to the maximum range for the current measurement type. The method then configures the measurement device according to the new range and takes another reading using the new range.
If the initial measurement or reading is less than the upper voltage of the current measurement range, then the method determines if the current measurement range is correct, i.e., if the reading is greater than a pre-determined fraction of the next lower measurement range, e.g., 90% of the (current-1) measurement range. If the reading is greater than 90% of the (current-1) measurement range, then the current measurement range is the correct measurement range for the initial measurement. Thus, if the reading is less than the current measurement range and greater than 90% of the (current-1) measurement range, then the current measurement range is determined to be the correct measurement range. In this case, the measurement device is already configured at the correct measurement range, e.g., a default measurement range. The board may then be set up for the next reading, and operation completes.
If the reading is not greater than 90% of the (current-1) measurement range, then the current measurement range is not the correct measurement range for the initial measurement. In this case, a new measurement range is determined based on the initial measurement. Thus, the new measurement range is intelligently determined based on the initial reading, preferably by software executing in the computer system. The process of determining a new measurement range is preferably to take the initial reading and compare it to a certain percentage, such as 90%, of the next smaller measurement range with respect to the (current-1) measurement range, which would be the (current-2) measurement range. If the initial reading is less than 90% of this next smaller measurement range, then the initial reading is compared to 90% of the following smaller measurement range. The process continues until the initial reading is not less than 90% of a measurement range. When this occurs, the next higher measurement range is the correct measurement range.
For example, a measuring device may have five voltage measurement ranges such as a 0.02 volt, 0.2 volt, 2 volt, 25 volt and a 250 volt range. Suppose the measuring device takes an initial measurement of a signal which measures 1.7 volts. Suppose further that the current measurement range is the 250 volt measurement range. Two conditions are examined to determine whether the current measurement range is the correct measurement range, these being that the reading should be less than the current measurement range and greater than 90% of the (current-1) measurement range. The (current-1) measurement range is the next smaller measurement range with respect to the current measurement range. In the example, 1.7 volts is less than the (current-1) measurement range, i.e. 25 volts. Therefore, the 250 volt measurement range is not the correct measurement range. Since the current measurement range is not the correct measurement range, a new measurement range is determined based on the initial measurement. As described above, the process would compare the reading with 90% of subsequently smaller measurement ranges until the initial reading is not less than 90% of a measurement range. In this example, that would occur with a measurement range of 0.2 volts. That is, 1.7 volts exceeds 0.90 times 0.2 volts. When that occurs, the measurement range above the 0.2 measurement range, i.e., the 2 volt range, becomes the new measurement range and the measurement device is set according to the new measurement range.
The measurement device then configures the measurement device according to the new measurement range and preferably takes another reading of the signal in the new measurement range, e.g., the 2 volt measurement range, to verify that the new measurement range is the correct measurement range. Normally, the new measurement range is the correct measurement range. Occasionally, because of an offset in the measurement device, the new measurement range is not the correct measurement range and the above process may repeat one more time.
Another particular embodiment is a system which performs autoranging on a measurement device. The system comprises a measurement device for measuring signals where the measurement device includes a plurality of measurement ranges. The system further comprises a computer system coupled to the measurement device where the computer system includes a memory medium and a processor coupled to the memory medium. The memory medium stores an autoranging software program for configuring the measurement device with a correct measurement range. The measurement device is operable to receive a first measurement. In response to the first measurement, the processor is operable to execute the autoranging software program to perform the method described above.
In one embodiment, where a device has more than one channel and has an autoranging capability as described above, the device may operate to maintain or store the last range used on a channel-by-channel basis. This allows the device to return to the last range for a respective channel, thus allowing quicker auto-ranging for each channel.